package demo;

import java.util.concurrent.LinkedBlockingDeque;

public class CommandQueue {
   static  LinkedBlockingDeque<String> queue= new LinkedBlockingDeque<>();
    public static void add(String command){
        queue.add(command);
    }
    public static  String  get() {
        try {
           return  queue.takeFirst();

        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

    public static LinkedBlockingDeque<String> getQueue() {
        return queue;
    }


}
